package com.modelscope.ai.config;


import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springdoc.core.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class Swagger3Config {

    @Bean

    public OpenAPI mallTinyOpenAPI() {

        return new OpenAPI().info(new Info()
                        .title("上海捷码信息技术服务有限公司 API ")
                        .description(" 上海捷码信息技术服务有限公司 接口演示")
                        .version("v1.0.0")
                        .license(new License().name("Apache 2.0")
                                .url("https://github.com/")))
                .externalDocs(new ExternalDocumentation()
                        .description("SpringBoot 后台接口")
                        .url("https://www.baidu.com"));
    }


//    @Bean
//    public GroupedOpenApi publicApi() {
//        return GroupedOpenApi.builder().group("springshop-public").pathsToMatch("/hello/**").build();
//    }
////    @Bean
//    public GroupedOpenApi adminApi() {
//        return GroupedOpenApi.builder()
//                .group("springshop-admin")
//                .pathsToMatch("/admin/**")
//                .addOpenApiMethodFilter(method -> method.isAnnotationPresent(Admin.class))
//                .build();
//    }

}